php forum
php mysql forum
php mysql smarty
 
Topic Options
#202829 - 04/07/04 07:13 AM [6.7] [beta] You Last Visited Wording
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Modification Name: You Last Visited Wording

Author(s): LK

Description: This is a very simple modification, which tells the users the last time they had visited your board in Forum Summary, under "Hello, X", according to their cookie. It also welcomes the new users, who don't have any cookie, and it links to the Update Post Indicators page. Uses your TimeZone setting.
The only reason it's not finished is because it isn't Wordletized.

Demo: http://www.lkworld.com

Requirements: UBB.classic 6.7.0+

Credits: Charles Capps for making this up @ "Flave"

Open public_forum_summary.pl.
Find:
Code:
		navbar_replace_right => qq~<b>$memberline</b>~,
Add below:
Code:
		navbar_under_left => qq~
<script type="text/javascript">
var atime = unescape(session_dt);
if (atime != "NEW") {
	var btime = atime.split("-");
	btime[0] = Math.round(btime[0]);
	btime[0]--;
	var ctime = btime[2].split(" ");
	dtime = ctime[1].split(":");
	dtime[0] = Math.round(dtime[0]);
	if (ctime[2] == "PM" && dtime[0] < 12) {
		dtime[0] += 12;
	} else if (ctime[2] == "AM" && dtime[0] == 12) {
		dtime[0] = 0;
	}
	document.write('You last visited: <b>'+timestamp(new Date(ctime[0],btime[0],btime[1],
dtime[0],dtime[1],0),dfrm,tfrm,0,0,0,0)+
'&nbsp;&nbsp;[<a href="$ULTIMATEBB{"ubb=markallread"}">Update Post Indicators</a>]</b>');
} else {
	document.write('Welcome to '+unescape('~.UBBCGI::escape($vars_config{BBName}).
qq~')+'!<b>&nbsp;&nbsp;[<a href="$ULTIMATEBB{"ubb=markallread"}">Update Post Indicators</a>]</b>');
}
</script>~,
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#202830 - 04/07/04 10:46 AM Re: [6.7] [beta] You Last Visited Wording
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
cool, thank you smile
_________________________
- Allen wavey
- What Drives You?

Top
#202831 - 04/07/04 10:52 AM Re: [6.7] [beta] You Last Visited Wording
Gizmo Offline

Wizard

Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
I was actually looking at your forum this morning and thinking to myself "you know, I'd like to have that" lol...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design & Development President
UBB.Threads: My UBBSkins, UBB.Sitemaps

Top
#202832 - 05/03/04 04:18 PM Re: [6.7] [beta] You Last Visited Wording
autostream Offline
Member

Registered: 05/15/01
Posts: 55
hey i thought i could use this on 6.3.1.1
by just putting it after:
Quote:
quote:
$show_logout
but nothing really happened....?
Should pretty similar, anyone know what is different?
thanks
scott

Top
#202833 - 05/03/04 06:53 PM Re: [6.7] [beta] You Last Visited Wording
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
all of the links wouldn't work. Neither would the timestamps.

Also, there's a small possibility your frames could be a problem.


That and it's not even in the source code. There's pretty much no way this would work on anything lower than 6.4 smile

Top
#202834 - 05/04/04 02:39 AM Re: [6.7] [beta] You Last Visited Wording
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
I think it should work on 6.0+, if you put it under $show_logout and without the navbar_under_left => qq~ and ~, parts.

Make sure you clear cache, and also I don't know if you put it on the correct show_logout place, I don't have a 6.3.1.1 forum active but maybe there is more than one $show_logout in public_forum_summary.
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#202835 - 05/04/04 11:27 AM Re: [6.7] [beta] You Last Visited Wording
havoq Offline
Member

Registered: 09/11/01
Posts: 667
Loc: MI
Naw I've tried it as well, and can't get it to work on my forums. Took out everything u said LK, before u even posted this. Cleared cache. Has to do with the javascript code, timestamp maybe
_________________________
-Jon
I have a measly [img]http://www.ubbdev.com/ud/?u=chugger93&s=1[/img] points, it's weak, I know wink
Where I continue to hack, even though it's a state of mind

Top
#202836 - 05/04/04 11:36 AM Re: [6.7] [beta] You Last Visited Wording
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
it has to do with what I said. I know what I'm talking about. timestamp was added in 6.4. ULTIMATEBB{"***"} was added in 6.7

Top
#202837 - 05/04/04 03:59 PM Re: [6.7] [beta] You Last Visited Wording
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Oh, I thought you only meant $ULTIMATEBB{""} is the problem.

You're correct Ian, my mistake... 6.4+ is needed.
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#202838 - 05/09/04 10:32 AM Re: [6.7] [beta] You Last Visited Wording
GATOR420 Offline
Member

Registered: 01/31/03
Posts: 118
Does this have any problems with the Thinking Clock already installed? It looks like it would take up the space where I have the clock already...
_________________________
-GATOR

"Pain is temporary, Pride is forever"

Top
#202839 - 05/09/04 10:36 AM Re: [6.7] [beta] You Last Visited Wording
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
shouldn't interfere at all

Top
#202840 - 05/09/04 11:34 AM Re: [6.7] [beta] You Last Visited Wording
GATOR420 Offline
Member

Registered: 01/31/03
Posts: 118
Yep, works no problem. Thanks!
_________________________
-GATOR

"Pain is temporary, Pride is forever"

Top
#202841 - 08/19/05 03:50 AM Re: [6.7] [beta] You Last Visited Wording
twslex Offline
Member

Registered: 06/13/02
Posts: 100
Hiya,

I'm getting debug errors on this script.

And i think i know what is wrong:

Code:
if (atime != "NEW") {
should have been:
Code:
if (atime != "NEW" && atime != "0") {
What do u think?

Top
#202842 - 08/19/05 03:52 PM Re: [6.7] [beta] You Last Visited Wording
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
actually, something like

Code:
if( atime.search(/d{2}/) != -1 ) {
would be simpler. You make sure it isn't NEW, or 0, so anything

Top



Moderator:  Charles, Gizmo 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks